package com.weicoder.cms.po

import java.util.List
import java.util.Map
import javax.persistence.Entity
import org.hibernate.annotations.DynamicInsert
import org.hibernate.annotations.DynamicUpdate
import org.hibernate.annotations.Type
import org.hibernate.search.annotations.Indexed
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.context.annotation.Scope
import org.springframework.stereotype.Component
import com.weicoder.base.annotation.Cache
import com.weicoder.site.entity.base.BaseEntityIdTime;
import scala.beans.BeanProperty

/**
 * 通用实体类
 * @author WD
 * @since JDK7
 * @version 1._ 2_13-_1-1_
 */
@Component
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Entity
@Cache
@Indexed
@DynamicInsert
@DynamicUpdate
class Entitys extends BaseEntityIdTime {
  // 实体名
  @BeanProperty
  var entity: String = _
  // 名称
  @BeanProperty
  var name: String = _
  // 状态
  @BeanProperty
  var state: Integer = _
  //	// List属性
  //	@Type(type = "com.weicoder.base.dao.hibernate.type.JsonType")
  //	List<Object>		list
  //	// Map属性
  //	@Type(type = "com.weicoder.base.dao.hibernate.type.JsonType")
  //	Map<Object, Object>	map

  def Entitys()={}

  def Entitys(entity: String) = this.entity = entity
}
